package com.yongbao.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yongbao.common.PageInfo;
import com.yongbao.model.domain.DishOrderDO;
import com.yongbao.model.request.DishOrderRequest;
import com.yongbao.model.request.manual.order.JoinOrderAddRequest;
import com.yongbao.model.request.manual.order.MainOrderAddRequest;
import com.yongbao.model.request.manual.order.NearbyOrderRequest;
import com.yongbao.model.vo.DishOrderVO;
import com.yongbao.model.vo.manual.DishOrderSubAreaStatisticsVO;
import com.yongbao.model.vo.manual.NearbyOrderVO;
import com.yongbao.model.vo.manual.UserBookDetailVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface DishOrderService extends IService<DishOrderDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    DishOrderVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<DishOrderVO> pageQuery(DishOrderRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<DishOrderVO> listQuery(DishOrderRequest request);
    /**
     * 新增【主订单】
     * @param request
     * @return
     */
    Boolean mainOrderAdd(MainOrderAddRequest request);
    /**
     * 新增【主订单】
     * @param request
     * @return
     */
    Boolean joinGroupAdd(JoinOrderAddRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(DishOrderRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean delByKey(String ids);

    /**
     * 预定详情
     * @return
     */
    List<UserBookDetailVO> bookDetail();

    /**
     * 查询附近订单
     * @param request
     * @return
     */
    NearbyOrderVO nearbyOrder(NearbyOrderRequest request);

    /**
     * 查询区域统计
     * @param request
     * @return
     */
    List<DishOrderSubAreaStatisticsVO> areaStatistics(DishOrderRequest request);
}
